#pragma once
#include "CoreArray.h"
#include "enums.cpp"

#include<iostream>
#include<cstdlib>

using namespace std;

class MoveArray
{
public:
	void retract(CoreArray* pCA, Direction d);
	bool create2Num(CoreArray* pCA);
private:
	bool retractByDirection(CoreArray* pCA, int* p, Direction d);
	int* addByDirection(CoreArray* pCA, int* p, Direction d);
	bool exchange0AndNon(int* zero, int* nonzero, CoreArray* ca);
};

